//
//  MusicSongFormCell.m
//  CarOfHome2
//
//  Created by 杨建家－52 on 15/10/5.
//  Copyright (c) 2015年 Frank. All rights reserved.
//

#import "MusicSongFormCell.h"

@interface MusicSongFormCell ()
@property (nonatomic,strong) UILabel *name;
@property (nonatomic ,strong) UILabel *singerName;
@property (nonatomic,strong) UILabel *red;
@end

@implementation MusicSongFormCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self =   [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.name = [[UILabel alloc]init];
        [self.contentView addSubview:self.name];
        self.singerName = [[UILabel alloc]init];
        [self.contentView addSubview:self.singerName];
        self.red = [[UILabel alloc]init];
        [self.contentView addSubview:self.red];
           }
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    self.name.frame = CGRectMake(0.05 * TcWidth, 5 * SAHeight, 0.9 * TcWidth, 0.5 * TcHeight);
    
    self.singerName.frame = CGRectMake(0.05 * TcWidth, 0.5 * TcHeight + 5 * SAHeight, 0.8 * TcWidth, 0.4 * TcHeight);
    
    self.red.frame = CGRectMake(0.02 * TcWidth, 5 * SAHeight, 0.02 * TcWidth,  0.8 * TcHeight);
//    self.contentView.backgroundColor = [UIColor colorWithHue:255.0 saturation:255.0 brightness:255.0 alpha:0];
//    self.contentView.alpha = 0;
}
- (void)setMusicModel:(MusicModel *)musicModel{
    
    self.name.text = musicModel.name;
    self.name.font = [UIFont fontWithName:@"Arial Unicode MS" size:19];
    self.name.textColor = [UIColor whiteColor];
    self.singerName.text = [NSString stringWithFormat:@"%@",musicModel.singerName];
    self.singerName.font = [UIFont fontWithName:@"Arial Rounded MT" size:15];
    self.singerName.textColor = [UIColor whiteColor];
    self.red.backgroundColor = [UIColor whiteColor];
    
    
 }




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
